package com.bluno.engine;


public class Rule {

	/**
	 * Valida a jogada
	 */
	public static boolean validateMove(Card tableCard, Card thrownCard)
	{
		if(tableCard == null)
			return true;
		
		if(tableCard.getId().charAt(0) == thrownCard.getId().charAt(0))
			return true;
		
		if(tableCard.getId().charAt(1) == thrownCard.getId().charAt(1))
			return true;
		
		//MUDARR ISDO DAQUII
		if(tableCard.getId().charAt(0) == 'W' || thrownCard.getId().charAt(0) == 'W')
			return true;
		
		return false;
	}
}
